options nocenter;
title 'data for first stage: new codes 3-11-04';
title 'dne, conpes, dublin, inl: four sources from Thoumi et al (1997)';

data one;
input province $ code coca99 coca00 coca01 dne conpes dublin inl area01 agr01;
cards;
Amazona 91 0 0 532 800 800 800 800 7121 .
Antioqu 5 3644 2547 3171 600 600 600 600 4049463 431042 
Arauca 81 0 978 2749 0 0 0 0 1941861 42417 
Atlanti 8 0 0 0 0 0 0 0 280675 20309
Bolivar 13 5897 5960 4824 2500 3400 2000 2300 1492060 179431 
Boyaca 15 0 322 245 0 0 0 0 1624793 166850
Caldas 17 0 0 0 0 0 0 0 646310 127081
Caqueta 18 23718 26603 14516 6800 24300 11700 20706 1419545 .
Casanar 85 0 0 0 0 0 0 0 4008038 159778
Cauca 19 6291 4576 3139 1237 2737 3402 3402 1309748 212700
Cesar 20 0 779 0 267 267 267 267 2000682 188687
Choco 27 0 250 354 130 130 130 130 624036 .
Cordoba 23 1920 117 652 0 0 0 0 1912272 146294
Cundina 25 0 66 22 0 0 0 0 2002289 211628
Guainia 94 0 853 1318 750 750 750 750 2225557 .
Guaviar 95 28435 17619 25553 16563 21228 30600 24448 337679 .
Huila 41 0 0 0 0 0 0 0 1357961 187461
LaGuaj 44 0 321 385 267 267 267 267 1689406 93927
Magdale 47 521 200 480 267 267 267 267 1678290 133787
Meta 50 11384 11123 11425 1350 17000 8500 8500 5400083 310799 
Nari�o 52 3959 9343 7494 400 2990 2990 2990 748468 171146
Norted 54 15039 6280 9145 300 300 300 300 1277189 125933
Putumay 86 58297 66022 47120 2224 3424 5000 15281 366961 34759
Quindio 63 0 0 0 0 0 0 0 148385 61889
Risaral 66 0 0 0 0 0 0 0 205506 89103 
SanAnd 88 0 0 0 0 0 0 0 4081 .
SantaF 11 0 0 0 0 0 0 0 . .
Santand 68 0 2826 415 0 0 0 0 2247225 218518
Sucre 70 0 0 0 0 0 0 0 885781 77253
Tolima 73 0 0 0 100 100 100 100 1778776 312094
Valled 76 0 76 184 0 0 0 0 1107024 312109
Vaupes 97 1014 1493 1918 1250 1250 1250 1250 . .
Vichada 99 0 4935 9166 1150 1150 1150 1150 5928189 .
;

data two;
set one;

 ** dep vars **;

 dnegrth99=coca99-dne;
 congrth99=coca99-conpes;
 dubgrth99=coca99-dublin;
 inlgrth99=coca99-inl;

 avg=(dne+conpes+dublin+inl)/4;

 dnegrth00=coca00-dne;
 congrth00=coca00-conpes;
 dubgrth00=coca00-dublin;
 inlgrth00=coca00-inl;
 
 avggrth99=coca99-avg;
 avggrth00=coca00-avg;

 ** region codes **;

 grow94=(code=13) or (code=18) or (code=19) or
        (code=50) or (code=52) or (code=86) or
        (code=95) or (code=97) or (code=99);

 plante94=(grow94=1) or (code=20) or 
	  (code=54) or (code=94);                     *** as coded by francisco;

 plante94p=(plante94=1) or (code=44) or (code=47);  *** all sierra nevada;
         
 medprod = plante94p-grow94;

label avggrth99 = '1994-1999 growth'
      avggrth00 = '1994-2000 growth'
      grow94 = '9-region dummy'
      plante94p = '14-region dummy'
      avg = 'average base'
      medprod = 'medium producers';

proc means;

proc means;
where grow94 eq 1;
title 'mean in 9 growing';

proc means;
where plante94p eq 1;          
title 'mean in 14 growing';

proc print;
 var code grow94 plante94 plante94p;

proc reg;
title 'coca growth: all provinces';
 model avggrth99 = grow94;
 model avggrth99 = plante94p;
 model avggrth99 = avg;
 model avggrth00 = grow94;
 model avggrth00 = plante94p;
 model avggrth00 = avg;

proc reg;
title 'coca growth: without the DMZ';
where code ne 18 and code ne 50;
 model avggrth99 = grow94;
 model avggrth99 = plante94p;
 model avggrth99 = avg;
 model avggrth00 = grow94;
 model avggrth00 = plante94p;
 model avggrth00 = avg;

proc reg;
title 'coca growth: no medium producers';
where medprod=0;
 model avggrth99 = grow94;
 model avggrth99 = plante94p;
 model avggrth00 = grow94;
 model avggrth00 = plante94p;

endsas;